import { defineStore } from 'pinia'
import { ref } from 'vue'
import type { User } from '@/types/user';
// 官网复制
export const useCounterStore = defineStore('wy-user', () => {
  const user = ref<User>()
  const setUser = (u: User) => {
    user.value = u
  }

  const delUser = () => {
    user.value = undefined
  }
  return { user, setUser, delUser }
},
  {
    persist: true
  }
)


